<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no-store"/>
    <meta http-equiv="Expires" content="0"/>
    <link rel="shortcut icon" type="image/x-icon" th:href="@{/static/favicon2.ico}">
    <link rel="stylesheet" th:href="@{/static/plugins/layui/css/layui.css}">
    <link rel="stylesheet" th:href="@{/static/css/layout.css}">
    <link rel="stylesheet" th:href="@{/static/css/common.css}">
    <style>
        img {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            overflow: hidden;
        }
    </style>
</head>
<body>
<!--主体内容区-->
<div class="form-content">
    <form class="layui-form" th:action="@{/checkinrecords/update}">
        <div class="layui-form-item">
        </div>
        <div class="layui-form-item">
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label ">姓名</label>
            <div class="layui-input-block">
                <input type="text" name="elderlyName"  readonly  style="color: #CCCCCC;"  autocomplete="off" class="layui-input" th:value="${elderly.name}">
                <input type="hidden" name="elderlyId"    autocomplete="off" class="layui-input" th:value="${elderly.id}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label ">身份证号</label>
            <div class="layui-input-block">
                <input type="text"  readonly  style="color: #CCCCCC;"  autocomplete="off" class="layui-input" th:value="${elderly.idNo}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label ">现住床位</label>
            <div class="layui-input-block">
                <input type="text"  readonly  style="color: #CCCCCC;"  autocomplete="off" class="layui-input" th:value="${elderly.buildingNo+'-'+elderly.roomNo+'-'+elderly.bedNo}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">选择空闲床位</label>
            <div class="layui-input-inline">
                <input type="hidden" name="buildingId" id="buildingId">
                <select  lay-filter="building">
                    <option value="">请选择楼宇</option>
                    <option value="" th:each="building:${buildings}" th:value="${building.id}" th:text="${building.name}"></option>
                </select>
            </div>
            <div class="layui-input-inline">
                <input type="hidden"  id="floor">
                <select id="floors"   lay-filter="floors">
                    <option value="">请选择楼层</option>
                </select>
            </div>
            <div class="layui-input-inline">
                <input type="hidden" name="roomId" id="room">
                <select  id="rooms" lay-filter="rooms">
                    <option value="">请选择房间</option>
                </select>
            </div>
            <div class="layui-input-inline">
                <input type="hidden" name="bedId" id="bedId">
                <input type="hidden" name="bedNo" id="bedNo">
                <select  id="beds"  lay-filter="beds">
                    <option value="">请选择空闲床位</option>
                </select>
            </div>
            <div style="font-size: 12px;color:#b2b2b2;margin-top:0;padding-left:115px;">如不选择空闲床位，老人的床位信息则不会修改</div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">床位类型</label>
            <div class="layui-input-block">
                <input type="text" readonly="readonly" id="typeName"  class="layui-input"   placeholder="选择床位后，床位类型自动回填" >
                <input type="hidden" readonly="readonly" id="type" name="type"  class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label must">护理部门</label>
            <div class="layui-input-block">
                <select name="nursingDepartmentId"  lay-verify="required" >
                    <option value="">请选择护理部门</option>
                    <option th:each="h:${departments}" th:value="${h.id}" th:text="${h.name}" th:selected="${elderly.nursingDepartmentId } eq ${h.id}"></option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label must">护理级别</label>
            <div class="layui-input-block">
                <select name="mealId"  lay-verify="required" >
                    <option value="">请选择护理级别</option>
                    <option th:each="m:${meals}" th:value="${m.id}" th:text="${m.name}" th:selected="${elderly.mealId } eq ${m.id}"></option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn  layui-btn-normal" lay-submit lay-filter="submitBtn">确认更改</button>
                <a href="/gbElderly/elist" class="layui-btn layui-btn-primary">返回</a>
            </div>
        </div>
    </form>
</div>



<script th:src="@{/static/plugins/jquery.js}"></script>
<script th:src="@{/static/plugins/layui/layui.js}"></script>
<script th:src="@{/static/js/common.js}"></script>
<script th:src="@{/static/plugins/jquery-migrate-1.2.1.min.js}"></script>
<script th:src="@{/static/js/elder/checkinrecords/checkInUpdate.js}"></script>


</body>

</html>